Optimal. Leaf size=38 \[ \frac{a \sin (c+d x) \cos (c+d x)}{2 d}+\frac{a x}{2}+\frac{b \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0377009, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {3787, 2635, 8, 2637} \[ \frac{a \sin (c+d x) \cos (c+d x)}{2 d}+\frac{a x}{2}+\frac{b \sin (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3787
Rule 2635
Rule 8
Rule 2637
Rubi steps
\begin{align*} \int \cos ^2(c+d x) (a+b \sec (c+d x)) \, dx &=a \int \cos ^2(c+d x) \, dx+b \int \cos (c+d x) \, dx\\ &=\frac{b \sin (c+d x)}{d}+\frac{a \cos (c+d x) \sin (c+d x)}{2 d}+\frac{1}{2} a \int 1 \, dx\\ &=\frac{a x}{2}+\frac{b \sin (c+d x)}{d}+\frac{a \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0661786, size = 35, normalized size = 0.92 \[ \frac{a (2 (c+d x)+\sin (2 (c+d x)))+4 b \sin (c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.045, size = 38, normalized size = 1. \begin{align*}{\frac{1}{d} \left ( a \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) +\sin \left ( dx+c \right ) b \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.07731, size = 46, normalized size = 1.21 \begin{align*} \frac{{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a + 4 \, b \sin \left (d x + c\right )}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.60059, size = 72, normalized size = 1.89 \begin{align*} \frac{a d x +{\left (a \cos \left (d x + c\right ) + 2 \, b\right )} \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.31119, size = 111, normalized size = 2.92 \begin{align*} \frac{{\left (d x + c\right )} a - \frac{2 \,{\left (a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 2 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]